import request from "@/utils/request";
const api_name = "/subject";

export default {
    //获取课程分类列表
    getList() {
        return request({
            url: `${api_name}`,
            method: "get"
        });
    },
    //添加课程分类列表
    addSubject(subject) {
        return request({
            url: `${api_name}`,
            method: "post",
            data: subject
        });
    },
    //删除课程分类列表
    deleteSubject(subjectId) {
        return request({
            url: `${api_name}/${subjectId}`,
            method: "delete"
        });
    }
};